import json
import os

from langchain_community.chat_models import ChatTongyi


def init_qw_llm():
    return ChatTongyi(
        model=json.loads(os.getenv("MODEL"))['QW'],
        api_key=json.loads(os.getenv("API_KEY"))['QW'],
        model_kwargs={
            "response_format": {"type": "json_object"}
        }
    )
